package it3807.semOppg1;

public class Logger {
	public static boolean WARN_ENABLED = true;
	public static boolean INFO_ENABLED = true;
	public static boolean DEBUG_ENABLED = true;
	
	public static void warn(Object obj, String str) {
		print("WARN", obj.toString(), str);
	}
	public static void warn(String loc, String str) {
		print("WARN", loc, str);
	}
	
	public static void info(Object obj, String str) {
		print("INFO", obj.toString(), str);
	}
	public static void info(String loc, String str) {
		print("INFO", loc, str);
	}
	
	public static void debug(Object obj, String str) {
		print("DEBUG", obj.toString(), str);
	}
	public static void debug(String loc, String str) {
		print("DEBUG", loc, str);
	}
	
	
	private static void print(String type, String loc, String msg) {
		System.err.println(type + " - " + loc + ": " + msg);
	}
}

